package com.example.demo.Component;

import com.example.demo.Model.UserInfo;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Component;

@Component
public class UserInfoController {
    @Bean
    public UserInfo userInfo(){
        return new UserInfo("zhangsan",19);
    }
    @Bean
   // @Primary
    public UserInfo userInfo1(){
        return new UserInfo("lisi",14);
    }
    @Bean
    public String name(){
        return "test";
    }
    @Bean
    public UserInfo userInfo2(String name){
        return new UserInfo(name,14);
    }


}
